#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_up_clicked()
{
    QRect object1 = ui->pushButton_target->geometry();
    object1.setY(object1.y()-5);
    ui->pushButton_target->setGeometry(object1);
}

void Widget::on_pushButton_left_clicked()
{
    QRect object1 = ui->pushButton_target->geometry();
    object1.setX(object1.x()-5);
    ui->pushButton_target->setGeometry(object1);
}

void Widget::on_pushButton_right_clicked()
{
    QRect object1 = ui->pushButton_target->geometry();
    object1.setX(object1.x()+5);
    ui->pushButton_target->setGeometry(object1);
}


void Widget::on_pushButton_down_clicked()
{
    QRect object1 = ui->pushButton_target->geometry();
    object1.setY(object1.y()+5);
    ui->pushButton_target->setGeometry(object1);
}
